package Homework2;

import java.util.Scanner;

public class Homework2_4 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String str1 = input.nextLine(), str2 = input.nextLine();
        int count = 0;
        int ind = 0;
        while ((ind = str1.indexOf(str2, ind)) != -1){
            count++;
            ind += str2.length();
        }
        System.out.println(count);
    }
}
